import request from '@/utils/request';

// 登录
export function userLogin(phone, password) {
  return request({
    url: '/webAuth/login' + `?phone=${phone}&password=${password}`,
    method: 'post',
  });
}

// 获取用户列表
export function getUserList(data) {
  return request({
    url: '/backGround/page',
    method: 'post',
    data,
  });
}

// 批量封禁用户
export function batchBanUsers(userIds) {
  return request({
    url: '/depth/backGround/block',
    method: 'post',
    data: userIds,
  });
}

// 批量解封用户
export function batchUnbanUsers(userIds) {
  return request({
    url: '/depth/backGround/unblock',
    method: 'post',
    data: userIds,
  });
}

// 获取用户详情
export function getUserDetail(userId) {
  return request({
    url: `/backGround/OnlineDetail/${userId}`,
    method: 'post',
  });
}
